package cn.cds.withyou.lib.model;

import android.database.Cursor;

import java.io.Serializable;
import java.sql.Timestamp;

import cn.cds.withyou.lib.Constants;

/**
 * <p> Description: </p>
 * <p/>
 * <p> Copyright: Copyright (c) 2016 </p>
 *
 * @author: Json.Lee
 * @Version: 1.0
 * @CreateTime: 7/5/2016 23:17
 */
public class FeedbackDto implements Serializable {

    private String id;
    private String phone;
    private String name;
    private long time;
    private String content;

    public FeedbackDto() {

    }

    public FeedbackDto(Cursor result) {
        id = result.getString(result.getColumnIndex(Constants._ID));
        phone = result.getString(result.getColumnIndex(Constants.FeedBack._PHONE_ITEM));
        name = result.getString(result.getColumnIndex(Constants.FeedBack._NAME_ITEM));
        content = result.getString(result.getColumnIndex(Constants.FeedBack._CONTENT_ITEM));
        time = Timestamp.valueOf(result.getString(result.getColumnIndex(Constants.FeedBack._TIME_ITEM))).getTime();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
